namespace TerritoryGame.Domain.Entities;

public class GameHistory
{
    public Guid Id { get; set; }
    public string RoomCode { get; set; } = string.Empty;
    public string RoomName { get; set; } = string.Empty;
    public DateTime EndedAt { get; set; }
    public int DurationSeconds { get; set; }
    public string? WinnerPlayerId { get; set; }
    public string? WinnerNickname { get; set; }
    public string? WinnerColor { get; set; }

    public ICollection<GameHistoryPlayer> Players { get; set; } = new List<GameHistoryPlayer>();
}

public class GameHistoryPlayer
{
    public Guid Id { get; set; }
    public Guid GameHistoryId { get; set; }
    public string PlayerId { get; set; } = string.Empty;
    public string? UserId { get; set; }
    public string Nickname { get; set; } = string.Empty;
    public string Color { get; set; } = string.Empty;
    public double Area { get; set; }
    public int Rank { get; set; }
}


